alias pypath='python3 -c "import sys; print(sys.path)";python2 -c "import sys; print(sys.path)"'
#export PYTHONPATH=$PYTHONPATH:/opt/python3-paramiko/noarch/2.10.2.p368/lib/python3.6/site-packages

hostname=$(hostname)

if [[ $hostname == *hzling45* ]]; then
   echo '$hostname'
   # source /opt/gcc/x86_64/6.1.0/interface/startup/linsee.env
fi
if [[ $hostname == *wrlinb199* ]]; then
    echo '$hostname'
fi


blankrm()
{
 sed -i 's/[[:space:]]*$//' $1
}
env_ip()
{
  if [ -z "$1" ]; then
    source conf 
  else
    source $1
  fi
  echo "Connect to $ENV_TP address $ENV_IP"
}

remote()
{
  env_ip $1
  sshpass -p "oZPS0POrRieRtu" ssh user@${ENV_IP} $2
}


_log()
{
   bsh 1:0 journalctl > ~/10.txt
}

getlog()
{
  env_ip $1

  echo "=====GET LOG FROM BSH 1:0"
  sshpass -p "oZPS0POrRieRtu" ssh user@${ENV_IP} "$(typeset -f _log); _log"
  sshpass -p "oZPS0POrRieRtu" scp user@${ENV_IP}:~/10.txt ${ENV_IP}.log
}

latestmb()
{
   ssh b2zhang@10.159.35.104 "ls /ps/PS_REL_YAFT_ZIPS/ |grep MB|sort"
}

#export YOCTO_BUILD="no"
#export CMAKE_SYSROOT="/var/fpwork/b2zhang/snf/uphwapi/SCI_Interface_SNF/os/sys-root/x86_64-pc-linux-gnu/"

setproxy () {
    export http_proxy=http://10.144.1.10:8080;export https_proxy=$http_proxy;export ftp_proxy=$http_proxy
}
unproxy() {
    unset http_proxy;unset https_proxy;unset ftp_proxy
}

setgitproxy () {
    git config --global http.proxy http://:8080
    git config --global https.proxy http://:8080
}

ungitproxy() {
    git config --global --unset http.proxy
    git config --global --unset https.proxy
}